<script type="text/javascript">
    //自动有效日期
    $(document).on('afterchange.bjui.datepicker', '.j_custom_issuedate', function(e, data) {
        var pattern = 'yyyy-MM-dd'
        var start   = end = data.value
        var $end    = $(this).closest('tr').find('.j_custom_indate')

        if ($end.length) {
            end.setFullYear(start.getFullYear() + 10)
            end.setDate(start.getDate() - 1)
            $end.val(end.formatDate(pattern))
        }
    })
    //上传图片完成回调
    function custom_pic_upload_success(file, data, $upload) {
        var json = $.parseJSON(data)
        if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
            var pic = json.navTabId

            $upload.next().val(pic).next().html('<img src="'+ pic +'" width="80" />')
        }
    }
    //删除回调
    $('#tabledit1').on('afterdelete.bjui.tabledit', function(e) {
        var $tbody = $(e.relatedTarget)

        console.log('你删除了一条数据，还有['+ $tbody.find('> tr').length +']条数据！')
    })
</script>
        <table id="tabledit1" class="table table-bordered table-hover table-striped table-top" data-toggle="tabledit" data-initnum="0" data-action="ajaxDone3.html" data-single-noindex="true">
            <thead>
            <tr data-idname="customList[#index#].id">
                <th title="参数策略">
                    <select name="handler" data-toggle="selectpicker" data-rule="required">
                        <#list handlers as handler>
                            <option value="${(handler.clazz)!}">${(handler.clazz)!}</option>
                        </#list>
                    </select>
                </th>
                <th title="" data-addtool="true" width="100">
                    <a href="javascript:;" class="btn btn-red row-del" data-confirm-msg="确定要删除该行信息吗？">删</a>
                </th>
            </tr>
            </thead>
            <tbody>
            <#if templateHandlers??>
            <#list templateHandlers as templateHandler>
                <tr data-id="$((templateHandler_index+1)!)">
                    <td data-val="${templateHandler.clazz}"></td>
                    <td data-noedit="true">
                        <a href="javascript:;" class="btn btn-red row-del" data-confirm-msg="确定要删除该行信息吗？">删</a>
                    </td>
                </tr>
            </#list>
            </#if>


            </tbody>
        </table>
